pick up the pieces

Redeem a bad situation, restore matters to normal, as in Once fighting ended, the task force picked up the pieces and restored democracy. [ Late 1800s ]